package com.ruoyi.web.controller.parkmanagement;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.parkmangement.service.ParkingStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/parkmanagement/parkingStats")
public class ParkingStatsController extends BaseController {

    @Autowired
    private ParkingStatsService parkingStatsService;

    @PreAuthorize("@ss.hasPermi('parkmanagementparkingStats:list')")
    @GetMapping("/list")
    public AjaxResult list() {
        List<Map<String, Object>> list = parkingStatsService.getParkingStatistics();
        return AjaxResult.success(list);
    }
}